package com.aiwei.tdjk.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * Created by yanfeng on 2016/12/19.
 */
@NoArgsConstructor
@AllArgsConstructor
public enum RechargeTypeEnum {

//    充值类型:1-支付宝、2-微信、3-收钱吧、4-信用卡

    aliPay(1,"支付宝"), weiPay(2,"微信"),shouqianbaPay(3,"收钱吧"),creditCardPay(4,"信用卡");

    @Getter
    private Integer code;
    @Getter
    private String info;


    public static RechargeTypeEnum getValue(int code) {
        final RechargeTypeEnum[] values = RechargeTypeEnum.values();
        for (RechargeTypeEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
